<%-- 
    Document   : newProduct
    Created on : May 14, 2010, 4:17:33 PM
    Author     : longdm
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>New Product Page</title>
    </head>
    <body>
        <h1><h:outputText value="Add a new product" /></h1>
        <img src="images/lamborghini-embolado-concept.jpg" alt="images" height="269" width="619"/>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Product name:" />
                <h:inputText value="#{ProductController.currentProduct.productName}"/>

                <h:outputText value="Price:" />
                <h:inputText value="#{ProductController.currentProduct.price}"/>

                <h:outputText value="Quantity:" />
                <h:inputText value="#{ProductController.currentProduct.quantity}"/>

                <h:outputText value="Rating:" />
                <h:inputText value="#{ProductController.currentProduct.rating}"/>

                <h:outputText value="Feature:" />
                <h:inputText value="#{ProductController.currentProduct.feature}"/>

                <h:outputText value="Description:" />
                <h:inputText value="#{ProductController.currentProduct.description}"/>

                <h:outputText value="Warehouse"/>
                <h:selectOneMenu value="#{ProductController.currentProduct.warehouseId}" converter="warehouseConverter">
                    <f:selectItems value="#{ProductController.warehouseSelectItems}"/>
                </h:selectOneMenu>

                <h:commandButton action="#{ProductController.newProduct}" value="Register"/>
                <h:commandButton action="productManager" value="Cancel"/>
            </h:panelGrid>
        </h:form>
    </body>
</html>
</f:view>